<template>
  <div>
    <div class="total-amount">
      <div class="total-amount-title">负责场库</div>
    </div>
    <el-table
      :data="orderDetails"
      style="width: 100%"
      :header-cell-style="{
        background: '#F1F1F1',
        'font-size': '14px',
        'font-weight': 600,
        color: '#333333',
      }"
      :cell-style="{
        'font-size': '14px',
        'font-weight': 400,
        color: '#333333',
      }"
    >
      <el-table-column label="序号" width="60" fixed="left">
        <template #default="scope">
          {{ (scope.$index + 1).toString().padStart(2, "0") }}
        </template>
      </el-table-column>
      <el-table-column prop="name" label="场库名称" min-width="80" />
      <el-table-column label="运营状态" min-width="40">
        <template #default="scope">
          <div>
            {{
              scope.row.status == 1
                ? "运营中"
                : scope.row.status == 2
                ? "车位已满"
                : scope.row.status == 3
                ? "已停业"
                : "-"
            }}
          </div>
        </template>
      </el-table-column>
      <el-table-column prop="address" label="详细地址" min-width="200" />
      <el-table-column prop="createdTime" label="创建时间" min-width="80" />
      <el-table-column label="操作" width="60" fixed="right">
        <template #default="scope">
          <el-button
            @click="detailData(scope.row)"
            type="primary"
            size="small"
            link
            style="color: #007aff; font-size: 14px"
            >详情</el-button
          >
        </template>
      </el-table-column>
      <template #empty>
        <el-empty :image="imgNone" />
      </template>
    </el-table>
  </div>
</template>

<script setup>
import { reactive, ref, defineProps } from "vue";
const imgNone = new URL("@/assets/image/imgNone.png", import.meta.url).href;
const props = defineProps({
  orderDetails: {
    type: Object,
    default: () => {},
  },
});
</script>

<style lang="less" scoped>
.total-amount {
  margin-bottom: 17px;
}
.total-amount-title {
  font-weight: 600;
  font-size: 16px;
  color: #1d2129;
}
</style>
